/**
 * 配置编译环境和线上环境之间的切换
 * 
 * baseUrl: 域名地址
 * routerMode: 路由模式
 * imgBaseUrl: 图片所在域名地址
 * 
 */

let baseUrl = ''; 
let routerMode = 'hash';
let imgBaseUrl;
const httptimeout = 1000;   // 单位ms
const HTTPCTL_INIT = 0;      // 初始状态
const HTTPCTL_SND = 1;       // 发送中
const HTTPCTL_RET = 2;       // 返回响应
const appId = 'TLP4v04';
const mchtCd = 'app123456789012';
const signType = 'RSA';

const ERRCD_SUCC = '000000';

if (process.env.NODE_ENV == 'development') {
  imgBaseUrl = 'http://cangdu.org:8001/img/';

}else if(process.env.NODE_ENV == 'production'){
  baseUrl = 'http://cangdu.org:8001';
  imgBaseUrl = 'http://cangdu.org:8001/img/';
}

export {
  baseUrl,
  routerMode,
  imgBaseUrl
}

export default {
  httptimeout,
  HTTPCTL_INIT,
  HTTPCTL_SND,
  HTTPCTL_RET,
  appId,
  mchtCd,
  signType,
  appId,
  mchtCd,
  ERRCD_SUCC
}
